import CFooter from '@/components/CFooter/CFooter'
import IProps from '@/model/other/IProps'
import { removeAppLoading } from '@/util/CommonUtil'
import { Card } from '@douyinfe/semi-ui'
import { useEffect } from 'react'
import './LoginRegisterBase.less'

interface ILoginRegisterBase extends IProps {
  name: string
}

export default function LoginRegisterBase(props: ILoginRegisterBase) {
  useEffect(() => {
    removeAppLoading() // 移除 appLoading
  }, [])

  return (
    <div className="vwh100 flex-c ai-c jc-c pure-top">
      <Card shadows="always">
        <h2 className="flex jc-s ai-s w-300">运营后台 | {props.name}</h2>
        {props.children}
      </Card>
      <CFooter />
    </div>
  )
}
